#include <types.h>
#include <po_hi_messages.h>
#include <po_hi_task.h>
#include <po_hi_main.h>
#include <po_hi_protocols.h>
/*  Periodic task : Pinger*/
/****************/
/* pinger_job */ 
/****************/

void* pinger_job ()
{
   simple_type p_spg_data_source;
   __po_hi_msg_t message;

   __po_hi_wait_initialization();
   while (1)
   {
      /*  Call implementation*/
      do_ping_spg(&(p_spg_data_source));
      /*  Call stub */
      ping_spg_stub(node_a_pinger_k,node_a_ping_me_k,&(message),p_spg_data_source);
      __po_hi_wait_for_next_period(node_a_pinger_k);
   }
}

/*  Sporadic task : Ping_Me*/
/*****************/
/* ping_me_job */ 
/*****************/

void* ping_me_job ()
{
   __po_hi_msg_t message;

   __po_hi_wait_initialization();
   while (1)
   {
      __po_hi_protocols_receive(node_a_pinger_k,&(message));
      process_request(&(message));
      __po_hi_msg_reallocate(&(message));
   }
}


